﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace AntC.AspNetCore.ApiEncryption.Internal.Interfaces
{
    /// <summary>
    /// 数据加密提供器
    /// </summary>
    public interface IEncryptProvider
    {
        /// <summary>
        /// 数据加密
        /// </summary>
        /// <param name="context">上下文</param>
        /// <param name="content">明文内容</param>
        /// <returns></returns>
        Task<string> Encrypt(ApiEncryptionContext context, string content);

        /// <summary>
        /// 数据解密
        /// </summary>
        /// <param name="context">上下文</param>
        /// <param name="content">密文内容</param>
        /// <returns></returns>
        Task<string> Decrypt(ApiEncryptionContext context, string content);
    }
}
